package com.nbjtjc.safe.service.cost;

import cn.hutool.core.util.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.mapper.cost.CostBudgetPlanTempletMapper;
import com.nbjtjc.safe.model.cost.CostBudgetPlanTemplet;

@Service
public class CostBudgetPlanTempletService {
	@Autowired
	CostBudgetPlanTempletMapper costBudgetPlanTempletMapper;
	
	public Result add(CostBudgetPlanTemplet costBudgetPlanTemplet){
		Result result = new Result();
		if(ObjectUtil.isNull(costBudgetPlanTemplet)){
			result.setFalse("新增模板内容不能为空");
			return result;
		}
		int res = costBudgetPlanTempletMapper.insertSelective(costBudgetPlanTemplet);
		if(res==0){
			result.setFalse("新增模板内容失败");
			return result;
		}
		
		return result;
	}
	
	
}
